import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import router from './router'
import qs from 'qs'
import store from './store';
import 'default-passive-events'
import { $get , $postFile , $postJson , $postX} from '@/ajax'

Vue.prototype.$get = $get
Vue.prototype.$postFile = $postFile
Vue.prototype.$postJson = $postJson
Vue.prototype.$postX = $postX

Vue.prototype.imgUrl = "http://192.168.148.50:8000"


Vue.prototype.df = function(d1){
      var date = new Date(d1)
      var y = date.getFullYear()
      var m = date.getMonth() + 1
      m = m < 10 ? ('0' + m) : m
      var d = date.getDate()
      d = d < 10 ? ('0' + d) : d
      const time = y + '-' + m + '-' + d
      return time
}
//打包
// axios.defaults.baseURL = ""
// Vue.prototype.imgUrl = ""

Vue.config.productionTip = false

Vue.prototype.$qs = qs

Vue.use(ElementUI)

new Vue({

  render: h => h(App),
  router : router,
  store

}).$mount('#app')